import Vue from "vue";
import Vuex from "vuex";
import createPersistedState from "vuex-persistedstate"

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    footActive:0,
  },
  getters:{
    getFootActive(state){
      return state.footActive
    }
  },
  mutations: {
    setFootActive(state,n){
      state.footActive=n
    }
  },
  actions: {},
  modules: {},
  plugins: [createPersistedState({
    storage: window.sessionStorage,
    reducer(val) {
      return {
      // 只储存state中的assessmentData
      footActive: val.footActive
    }
 }
})]
});
